package com.neuedu.studentmanage.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neuedu.studentmanage.entity.Pager;
import com.neuedu.studentmanage.entity.Result;
import com.neuedu.studentmanage.entity.User;
import com.neuedu.studentmanage.mapper.UserMapper;
import com.neuedu.studentmanage.service.UserService;

@Service
@Transactional
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserMapper userMapper;

	@Override
	public List<User> findListByPager(Pager<User> pager) {
		return null;
	}

	@Override
	public Integer findTotalByPager(Pager<User> pager) {
		return null;
	}

	@Override
	public Result add(User object) {
		return null;
	}

	@Override
	public Result edit(User object) {
		Result result = new Result(false,"修改密码失败！");
		boolean ret = userMapper.edit(object);
		if (ret) {
			result = new Result(true, "修改密码成功！");
		}
		return result;
	}

	@Override
	public Result deleteByIds(List<User> ids) {
		return null;
	}

	@Override
	public User login(User user) {
		return userMapper.login(user);
	}

	@Override
	public List<User> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	

}
